<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="apple-touch-fullscreen" content="YES">
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<!-- <meta http-equiv="Expires" content="-1">
	<meta http-equiv="pragram" content="no-cache"> -->
	
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>个人信息</title>
	<!--引入pageSlider所需样式表-->
	<link rel="stylesheet" type="text/css" href="css/pageSlider.css">
	<!--引入zepto.js-->
	<script type="text/javascript" src="js/zepto.js"></script>
	<!--引入pageSlider.js文件-->
	<script type="text/javascript" src="js/pageSlider.js"></script>
	<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
	<!-- <script type="text/javascript" src="js/jquery.rotate.js"></script> -->
	<script src="js/DD_roundies_min.js"></script>
</head>
<body style="background-color: #f0f0f0">
	<!--DOM结构-->
	<div style="background-color: #0066b2;width: 100%;height: 30%">
		<div style="position: relative;margin-left: 0.5em;margin-top: 0px">
			<img alt="" src="images/logo.png" style="margin-top: 2em">
		</div>
		<div style="display: inline-block;vertical-align: middle;">
			<table style="position: relative;margin-top: 0.7em;margin-left: 1.5em;vertical-align: middle;">
				<tr>
					<td class="circle3_div" style="width: 100%;height: 100%">
						<img src="" class="circle1_img" id="headImg" width="8.5em" height="4.2em"/>
					</td>
					
					<td style="color: #ffffff;font-size: 11pt" width="70%;">
						<div id="userName"></div>
						<div id="position">&nbsp;</div>
						<div id="userName">航天信息股份有限公司湖北研发分部</div>
					</td>
					
					<!-- 头像 -->
			<!-- <div class="circle3_div" style="float: left;margin-left: 1.5em;margin-top: 3em">
				<img src="" class="circle1_img" id="headImg" width="8.5em" height="4.2em"/>
			</div>
			
			<div style="float: left;margin-left: 9em;margin-top: 1em;color: #ffffff;padding-bottom: 3em;position: relative;">
				<div id="userName"></div>
				<div id="userName">高级java开发工程师</div>
				<div id="userName">航天信息股份有限公司湖北研发分部</div>
			</div> -->
				</tr>
			</table>
		</div>
	</div>
	
	<div style="background-color: #00adef;width: 100%;height: 1em">
	</div>
	
	<div id="nickName" style="position: relative;margin-top: 2em;background-color: #ffffff;height:3em;vertical-align: middle;margin-top: 0.5em;margin-bottom: 0em;line-height: 3em;padding-left: 1em">昵称：&nbsp;</div>
	<div id="phone" style="position: relative;margin-top: 2em;background-color: #ffffff;height:3em;vertical-align: middle;margin-top: 0.5em;margin-bottom: 0em;line-height: 3em;padding-left: 1em">手机号码：&nbsp;</div>	
	<div id="email" style="position: relative;margin-top: 2em;background-color: #ffffff;height:3em;vertical-align: middle;margin-top: 0.5em;margin-bottom: 0em;line-height: 3em;padding-left: 1em">邮箱：&nbsp;</div>
	<div id="address" style="position: relative;margin-top: 2em;background-color: #ffffff;height:3em;vertical-align: middle;margin-top: 0.5em;margin-bottom: 0em;line-height: 3em;padding-left: 1em">地址：&nbsp;</div>
	
	<!-- <div style="text-align: left;position: relative;margin-left: 3em">
			<div id="nickName" style="position: relative;margin-top: 20px">121</div>
			<div id="phone" style="position: relative;margin-top: 20px">121</div>	
			<div id="email" style="position: relative;margin-top: 20px">1212</div>
			<div id="address" style="position: relative;margin-top: 20px">1212</div>
	</div> -->
		
	
	<script type="text/javascript">
			
			$(document).ready(function(){
				var protocol =window.location.protocol;
				var host =window.location.host;
				var path =window.location.search;
				var pamars =path.substring(path.indexOf('?')+1);
				var fileIds =pamars.split("&");
				var userId=fileIds[0].substring(fileIds[0].indexOf('=')+1);
				var headImg =document.getElementById("headImg");
				var pathname=window.location.pathname.replace("/h5/score/score.html","").replace("/","");
				// 设置人头像 audio.src="http://"+host+"/yokivoice/restful/upload/showPic/"+fileId;
				//headImg.src=protocol+"//"+host+"/"+pathname+"/restful/fileUploadController/getUserPicNew?userId="+userId+"&picType=3";
				
				
				var mapGroup1 ={
					"1":'产品工程师',
					"2":'产品经理'
				};

				var mapGroup2 ={
					"1":'测试工程师岗'
				};
				
				var mapGroup3 ={
					"1":'实习生',
					"2":'java初级开发',
					"3":'java中级开发"',
					"4":'java高级开发',
					"5":'java架构师',
				};
				var mapGroup4 ={
					"1":'部门经理',
					"2":'湖北研发中心主任'
				};
				
				//  获取用户信息
				$.ajax({ 
					 type: "GET",
					 url: "/address/restful/user/getUserDetailById/"+userId,
					 dataType: "json",
					 success: function(resp){
						 
						 if(resp.obj ==null || resp.obj =="" || typeof(resp.obj) == 'undefined'){
							 resp.obj={};
						 }
						 if(check(resp.obj.userName) !=""){
							 $("#userName").html(check(resp.obj.userName));
						 }
						 
						 if(check(resp.obj.nickName) !=""){
							 $("#nickName").html("昵称："+check(resp.obj.nickName))
						 }
						
						 if(check(resp.obj.mobile) !=""){
							 $("#phone").html("手机号码："+"<a style='text-decoration : none' href ='tel:"+check(resp.obj.mobile)+"'>"+check(resp.obj.mobile)+"</a>")
						 }
						 
						 if(check(resp.obj.email) !=""){
							 $("#email").html("邮箱："+check(resp.obj.email))
						 }
						 
						 if(check(resp.obj.address) !=""){
							 $("#address").html("地址："+check(resp.obj.address))
						 }
						 
						 var gropuId =resp.obj.groupId;
						 
						 setPosition(gropuId,resp.obj.positionId);
						 
						 // 设置头像
						 url =resp.obj.userPicUrl;
						 if(url ==null || url =="" || typeof(resp.obj.userPicUrl) == 'undefined'){
							 headImg.src="http://p2zmea1zp.bkt.clouddn.com/FkGj6ijekwneOBGf5F9ztmPuas8O";
						 }
						 else{
							 headImg.src="http://p2zmea1zp.bkt.clouddn.com/"+resp.obj.userPicUrl;
						 }
						 DD_roundies.addRule('.circle1_img', '400px', true);
					 },
					 error: function(XMLHttpRequest, textStatus, errorThrown) {
						 
					 }
				});
				
				
			   function setPosition(groupId,positionId){
				   if(groupId=="0"){
					   $("#position").hide();
				   }
				   if(groupId=="1"){
					   $("#position").html(mapGroup1[positionId])
				   }
				   if(groupId=="2"){
					   $("#position").html(mapGroup2[positionId])
				   }
				   if(groupId=="3"){
					   $("#position").html(mapGroup3[positionId])
				   }
				   if(groupId=="4"){
					   $("#position").html(mapGroup4[positionId])
				   }
			   }
			   
			   function check(value){
				   if(value ==null || value =="" || typeof(value) == 'undefined'){
					  return "";
				   }
				   else{
					   return value;
				   }
			   }
			});
	</script>
</body>
</html>